// operations colors
@swagger-ui-color-get-method: #0f6ab4;
@swagger-ui-color-get-border: #c3d9ec;
@swagger-ui-color-get-hide: #6fa5d2;
@swagger-ui-color-get-bg: #e7f0f7;

@swagger-ui-color-post-method: #10a54a;
@swagger-ui-color-post-border: #c3e8d1;
@swagger-ui-color-post-hide: #6fc992;
@swagger-ui-color-post-bg: #ebf7f0;

@swagger-ui-color-put-method: #c5862b;
@swagger-ui-color-put-border: #f0e0ca;
@swagger-ui-color-put-hide: #dcb67f;
@swagger-ui-color-put-bg: #f9f2e9;

@swagger-ui-color-delete-method: #a41e22;
@swagger-ui-color-delete-border: #e8c6c7;
@swagger-ui-color-delete-hide: #c8787a;
@swagger-ui-color-delete-bg: #f5e8e8;

@swagger-ui-color-patch-method: #d38042;
@swagger-ui-color-patch-border: #f5d5c3;
@swagger-ui-color-patch-hide: #dcb67f;
@swagger-ui-color-patch-bg: #fce9e3;

@swagger-ui-color-head-method: #ffd20f;
@swagger-ui-color-head-border: #ffd20f;
@swagger-ui-color-head-hide: #6fc992;
@swagger-ui-color-head-bg: #fcffcd;

@headings-line-height:    1.1;
@line-height-computed:    20px;
@font-family-monospace:   Menlo, Monaco, Consolas, "Courier New", monospace;


.swagger-ui-operation(@method-color; @border-color; @hide-color; @bg-color){

  .heading,
  .content{
    background-color: @bg-color;
    border: 1px solid @border-color;
  }

  .http-method{
    background-color: @method-color;
  }

  h5,
  .description{
    color: @method-color;
  }

  a.hide-try-it{
    color: @hide-color;
  }

}

.swagger-ui{

  .api-description{
    margin-bottom: 20px;
  }

  .api-version{
    color: #999;
  }

  .external-docs{
    color: #000;
  }

  .endpoint{

    border-bottom: 1px solid #ddd;

    &:last-child{
      border: 0;
    }

    &.active,
    &:hover{

      h4 a{
        color: #000;
      }

      .endpoint-actions li a{
        color: #555;
      }
    }

    a{

      text-decoration: none;
      color: #999;

      &:hover{
        color: #000;
        text-decoration: underline;
      }
    }

    .endpoint-heading span{
      color: #999;
    }

    .endpoint-actions{

      line-height: @headings-line-height;
      margin: (@line-height-computed / 2) 0;

      li{

        border-right: 1px solid #ddd;

        &:last-child{
          border-right: 0;
        }
      }
    }

  }

  .operation{

    margin-bottom: 10px;

    .heading a:hover{
      text-decoration: none;
    }

    .http-method{
      color: #fff;
      padding: 7px 0 4px;
      text-align: center;
      width: 50px;
      border-radius: 2px;
      display: inline-block;
      font-size: .7em;
    }

    .path{
      color: #000;
      padding-left: 10px;
      display: inline-block;
    }

    .description{
      margin: 2px 10px 0 0;
    }

    .content-type label{
      margin-right: 5px;
    }

    .content{

      padding: 10px;
      border-top: 0 !important;

      h5{
        font-weight: bold;
        padding: 15px 0 5px;
        margin: 0;
      }

      .table{
        margin: 0;
        font: inherit;
        table-layout: fixed;
        min-width: 650px;
      }

      .table-responsive .table{
        td,
        th{
          white-space: initial;
          word-break: break-word;
        }
      }

      thead th{
        color: #666;
        padding: 5px;
        border-bottom: 1px solid #999;
      }

      pre{
        background-color: #fcf6db;
        border: 1px solid #e5e0c6;
        max-height: 200px;
        overflow: auto;
        font-size: .9em;
        word-wrap: initial;
      }

      input,
      textarea{
        width: 100%;
      }

      textarea{
        height: 100px;
        resize: none;
        font-family: @font-family-monospace;
        font-size: .9em;
      }

      label{
        font-weight: normal;
      }

      ul.schema{

        margin: 0;

        li{
          border-right: 1px solid #ddd;
          margin: 0 5px 5px 0;
          padding: 2px 5px 2px 0;

          &:last-child{
            border-right: 0;
          }

          a{
            color: #aaa;

            &.active,
            &:hover{
              color: #000;
            }

          }

        }
      }

      pre.model{

        font: inherit;
        border: 0;
        background: transparent !important;
        height: auto;
        max-height: initial;
        cursor: text;
        font-size: .9em;
        word-break: break-word;
        white-space: normal;

        .model-item{
          margin-bottom: 5px;
        }

        .type{
          color: #5555aa;
        }

        .pad{
          margin-left: 1em;
        }
      }

      .parameters{

        .model-schema pre{

          cursor: pointer;

          &:hover{
            background-color: #ffd;
          }
        }
        .name{
          width: 12%;
        }
        .value{
          width: 30%;
        }
        .desc{
          width: 20%;
        }
        .type{
          width: 12%;
        }
      }

      .responses{
        .code{
          width: 15%;
        }
      }

      .hide-try-it{
        text-decoration: underline;
        padding: 4px 0 0 10px;
      }

    }
  }

  .get{
    .swagger-ui-operation(@swagger-ui-color-get-method, @swagger-ui-color-get-border, @swagger-ui-color-get-hide, @swagger-ui-color-get-bg);
  }

  .post{
    .swagger-ui-operation(@swagger-ui-color-post-method, @swagger-ui-color-post-border, @swagger-ui-color-post-hide, @swagger-ui-color-post-bg);
  }

  .put{
    .swagger-ui-operation(@swagger-ui-color-put-method, @swagger-ui-color-put-border, @swagger-ui-color-put-hide, @swagger-ui-color-put-bg);
  }

  .delete{
    .swagger-ui-operation(@swagger-ui-color-delete-method, @swagger-ui-color-delete-border, @swagger-ui-color-delete-hide, @swagger-ui-color-delete-bg);
  }

  .patch{
    .swagger-ui-operation(@swagger-ui-color-patch-method, @swagger-ui-color-patch-border, @swagger-ui-color-patch-hide, @swagger-ui-color-patch-bg);
  }

  .head{
    .swagger-ui-operation(@swagger-ui-color-head-method, @swagger-ui-color-head-border, @swagger-ui-color-head-hide, @swagger-ui-color-head-bg);
  }

  .bold,
  .bold label{
    font-weight: bold !important;
  }

}